-
Notifications
You must be signed in to change notification settings - Fork 443
chore(llmobs): dac strip io from vertex #13693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 284 ± 5 ms. The average import time from base is: 283 ± 4 ms. The import time difference between this PR and base is: 1.2 ± 0.2 ms. Import time breakdownThe following import paths have shrunk:
|
BenchmarksBenchmark execution time: 2025-06-26 21:50:07 Comparing candidate commit 244540a in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 568 metrics, 3 unstable metrics. scenario:iastaspectsospath-ospathjoin_aspect
|
@@ -3,6 +3,7 @@ | |||
from typing import Dict | |||
|
|||
import vertexai | |||
from vertexai.generative_models import GenerativeModel # noqa:F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this import (which used to exist on ./_utils.py
but is no longer used there) breaks tests. As far as I can tell, it may have to do with vertex lazy loading, meaning that .generative_models
may not exist yet when patching.
If this is a known thing that we have a standard way to deal with, let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm interesting, I would probably put this import in the patch function directly (as long as that works) so that we only import it when we actually do the patching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still fails. Looking closer, it will actually fail on the assertion that we are unpatched before calling .patch, since the thing we check isn't imported. There might be a way to move this to the test itself (a little tricky since its the base tests, not the vertex ones). Do you think that would be worth it?
tests/snapshots/tests.contrib.vertexai.test_vertexai.test_vertexai_completion_stream_tool.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments which should hopefully be quick. Going to approve for now, but if there's anything you are unsure about, feel free to reach out for another review!
This should probably get a release note? |
Remove potentially sensitive i/o data from apm spans. This way, prompt and completion data will only appear on the llm obs spans, which are/will be subject to data access controls.
Mostly, this just removes io tag sets. A few things (mostly metrics) have llmobs tags dependent on span tags, so there is a bit more refactoring there.
Let me know if I removed anything that should really stay, or if I missed something that should be restricted.
Checklist
Reviewer Checklist